package com.gudy.counter.Controller;

import com.gudy.counter.util.DBUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/heelo")
@RestController
public class HeeloController {
   @Autowired
   private StringRedisTemplate template;

   @GetMapping("/redistest")
   public String getredisData(){
       template.opsForValue().set("test:Heelo","你好");
       return template.opsForValue().get("test:Heelo");
   }

   @GetMapping("/test")
   public String heelo(){
       return null;
   }
}
